package main

import (
	"context"
	"fmt"
	"gitee.com/DonHz/electronic-business-systems/mxshop_srvs/goods_srv/proto"
	"google.golang.org/protobuf/types/known/emptypb"
)

func TestGetAllCategorysList() {
	res, err := brandClient.GetAllCategorysList(context.Background(), &emptypb.Empty{})
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Total)
	for _, category := range res.Data {
		fmt.Println(category.Name)
	}
	fmt.Println(res.JsonData)
}
func TestGetSubCategory() {
	res, err := brandClient.GetSubCategory(context.Background(), &proto.CategoryListRequest{
		Id: 130358,
	})
	if err != nil {
		panic(err)
	}

	fmt.Println(res.SubCategorys)
}
